
TARGET_livesink = sample_mppsrc_2_livesink
TARGET_ffsink = sample_mppsrc_2_ffsink

SRC = $(wildcard *.c)

LOCAL_INCLUDE = -I$(OUT_DIR)/include \
	-I$(FRAMEWORK_DIR)/base/lindutils

LOCAL_LIBRIARY = -L$(OUT_DIR)/lib/ \
	-lldutils -lmpp_source -llindcomponent -lpthread

all: livesink ffsink

livesink:
	$(CC) $(SRC) -o $(TARGET_livesink) -DSINK_MODE_LIVE $(LOCAL_LIBRIARY) $(LOCAL_INCLUDE) -Wl,--allow-shlib-undefined
	$(INSTALL) $(TARGET_livesink) $(OUT_DIR)/bin/$(TARGET_livesink)
	rm -rf $(TARGET_livesink) $(OBJFILE)

ffsink:
	$(CC) $(SRC) -o $(TARGET_ffsink) -DSINK_MODE_FF $(LOCAL_LIBRIARY) $(LOCAL_INCLUDE) -Wl,--allow-shlib-undefined
	$(INSTALL) $(TARGET_ffsink) $(OUT_DIR)/bin/$(TARGET_ffsink)
	rm -rf $(TARGET_ffsink) $(OBJFILE)

clean:
	rm -rf $(TARGET_livesink) $(TARGET_ffsink) $(OBJFILE)
	rm -rf $(OUT_DIR)/bin/$(TARGET_livesink) $(OUT_DIR)/bin/$(TARGET_ffsink)
